<div class="properties index">

	<div class="row">
		<div class="col-md-12">
			<div class="page-header">
				<h1><?php echo __('Properties'); ?></h1>
			</div>
		</div><!-- end col md 12 -->
	</div><!-- end row -->



	<div class="row">

    <?php echo $this->element('admin-menu'); ?>
<!-- end col md 3 -->

		<div class="col-md-9">
			<table cellpadding="0" cellspacing="0" class="table table-striped">
				<thead>
					<tr>
						<th><?php echo $this->Paginator->sort('id'); ?></th>
						<th><?php echo $this->Paginator->sort('title'); ?></th>
						<th><?php echo $this->Paginator->sort('user_id','Agent/Broker'); ?></th>
						<th><?php echo $this->Paginator->sort('address'); ?></th>
						<th><?php echo $this->Paginator->sort('city_id'); ?></th>
						<th><?php echo $this->Paginator->sort('published_on'); ?></th>
						<th><?php echo $this->Paginator->sort('price','Price ('.__($websiteSettings['currency_symbol']).')'); ?></th>
						<th><?php echo $this->Paginator->sort('property_type_id'); ?></th>
						<th><?php echo $this->Paginator->sort('contract_type'); ?></th>
						<th><?php echo $this->Paginator->sort('active'); ?></th>
						<th class="actions"></th>
					</tr>
				</thead>
				<tbody>
				<?php foreach ($properties as $property): ?>
					<tr>
						<td><?php echo h($property['Property']['id']); ?>&nbsp;</td>
						<td><?php echo h($property['Property']['title']); ?>&nbsp;</td>
								<td>
			<?php echo $this->Html->link($property['User']['email'], array('controller' => 'users', 'action' => 'view', $property['User']['id'])); ?>
		</td>
						<td><?php echo h($property['Property']['address']); ?>&nbsp;</td>
								<td>
			<?php echo $this->Html->link($property['City']['title'], array('controller' => 'cities', 'action' => 'view', $property['City']['id'])); ?>
		</td>
						<td><?php echo h($property['Property']['published_on']); ?>&nbsp;</td>
						<td><?php echo h($property['Property']['price']); ?>&nbsp;</td>
								<td>
			<?php echo $this->Html->link($property['PropertyType']['title'], array('controller' => 'property_types', 'action' => 'view', $property['PropertyType']['id'])); ?>
		</td>
						<td><?php echo h($property['Property']['contract_type']); ?>&nbsp;</td>
						<td><?php echo h($property['Property']['active']); ?>&nbsp;</td>
						<td class="actions">
							<?php echo $this->Html->link('<span class="glyphicon glyphicon-search"></span>', array('action' => 'view', $property['Property']['id']), array('escape' => false)); ?>
							<?php echo $this->Html->link('<span class="glyphicon glyphicon-edit"></span>', array('action' => 'edit', $property['Property']['id']), array('escape' => false)); ?>
							<?php echo $this->Form->postLink('<span class="glyphicon glyphicon-remove"></span>', array('action' => 'delete', $property['Property']['id']), array('escape' => false), __('Are you sure you want to delete # %s?', $property['Property']['id'])); ?>
						</td>
					</tr>
				<?php endforeach; ?>
				</tbody>
			</table>

            <?php echo $this->element('admin-paginate'); ?>

		</div> <!-- end col md 9 -->
	</div><!-- end row -->


</div><!-- end containing of content -->